//
// Simple Javascript mask framework. Uses JQuery and PHP.JS.
// Requires jquery.mask.js.
// 

// Possibles masks:
var DDD_MASKS = {
  date: "99/99/9999",
  brazilian_date: "99/99/9999",
  brazilian_phone: "(99) 9999-9999",
  brazilian_cpf: "999.999.999-99",
  brazilian_cep: "99.999-999"
};

function ddd_mask() {
  $("*[mask]").each(function() {
    var mask_name = $(this).attr("mask");
    var mask = DDD_MASKS[mask_name];
    
    try {
      $(this).mask(mask);   
    } catch (e) {}
  });
}


